<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="control.SubColumnControl"%>
<%@page import="java.util.List"%>
<%@page import="model.SubColumn"%>
<%@page import="util.ParamUtil"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script charset="utf-8" src="../../../ke/kindeditor.js"></script>
<script charset="utf-8" src="../../../ke/lang/zh_CN.js"></script>
<script>
        var editor;
        KindEditor.ready(function(K) {
        	   K.create('#textarea_id', {
                uploadJson : '../../../ke/jsp/upload_json.jsp',
                fileManagerJson : '../../../ke/jsp/file_manager_json.jsp',
                allowFileManager : true
        });
        });
</script>
</head>
<body>
<%
     int sid = ParamUtil.getInt(request,"sid",1);
 %>
<form action="news_add_do.jsp" method="post">
<label>标题<input type="text" name="title" /></label>
<label>关键词<input type="text" name="keyword"></label>
<label>所属栏目<select name="subcolumn">
<option value="">选择栏目</option>
<%
        List<SubColumn>  subs = SubColumnControl.getAllSubcolumn();
        for(SubColumn s : subs){
        	%>
        	<option value="<%=s.getId() %>" <%if(s.getId()==sid)out.print("selected='selected'"); %>><%=s.getSubcolumn() %></option>
        	<%
        }
%>
</select>
</label>
<textarea id="textarea_id" name="content" style="width:700px;height:300px;"></textarea>
<label><input type="submit" value="发布"><input type="reset" value="清空"></label>
</form>
</body>
</html>